package com.huluobo.a2201mvvm_imdemo.contact;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.a2201mvvm_imdemo.mvvm.BaseViewModel;

import java.util.List;

/**
 * Created by LC on 2024/4/1.
 */
public class ContactViewModel extends BaseViewModel<ContactRepo> {
    MutableLiveData<List<ContactListItemBean>> getContactsSuccess = new MutableLiveData<>();
    MutableLiveData<String> getContactsFailed = new MutableLiveData<>();

    public void getAllContact() {
        repo.getAllContacts(getContactsSuccess, getContactsFailed);
    }

    @Override
    protected ContactRepo createRepo() {
        return new ContactRepo();
    }
}
